const express = require('express')

const app = express()

// 3 定义好一个端口
const port = 8000

app.get('/', (req, res) => {
  console.log(req);
  res.send({ code: 200, msg: "欢迎访问" });
})

app.listen(port, () => {
  console.log(`Example app listening at http://localhost:${port}`)
})